#ifndef __ANGS_UTILS_H__
#define __ANGS_UTILS_H__



#define ERROR -2

//#define WORD unsigned char
#define WORD unsigned int
#define BITS_PER_WORD (8*sizeof(WORD)) // in bits
#define BITS_PER_BASE 2
#define BASES_PER_WORD (BITS_PER_WORD/BITS_PER_BASE)

#define BCHAR(byte,position) ((int)( ((byte) >> (BITS_PER_WORD - BITS_PER_BASE*((position)+1)) ) & 3 ))


#define MIN(a, b) ((a)<=(b) ? (a) : (b))
#define MAX(a, b) ((a)>=(b) ? (a) : (b))

#define MAXLINE 1024


typedef struct {
	long id;
	int real_length;
	WORD *bitseq;	
} SEQUENCE;







void start_watch();
void stop_watch();

WORD n2c(char);


int blen(int);

void fasta2seq(char *, SEQUENCE ***, SEQUENCE **, WORD **, int *, int *);

char c2n(WORD);


void seq2buffer(SEQUENCE *, char *);

void bitseq2char(WORD *, int , char *);





#endif
